home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Standard in C++ missing from C?????
- Date: Fri, 26 Jan 96 23:52:34 GMT
- Organization: none
- Message-ID: <822700354snz@genesis.demon.co.uk>
- References: <4eb1dm$ogl@lunar.eclipse.net>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4eb1dm$ogl@lunar.eclipse.net> meritech@eclipse.net writes:
-
- >Does C++ have a standard written for the definition of :
- >
- >p = p++;
-
- The place to ask questions about C++ is comp.lang.c++.
-
- >My boss asked me, and I have no clue. I know that C basically says that this
- >is undefined and should NOT be used in a real program. And I know the debate
- >that rages on and on. BUT, does C++ have this same problem???
-
- What problem? That expression simply doesn't mean anything. If you meant
- p = p+1 or p++ then write just that.
-
- >My compiler doesn't complain, but then, that doesn't supprise me either.
-
- The expression has undefined behaviour (in C and C++) but the compiler
- isn't required to warn about it. In it's general form this situation can't
- be detected at compile time.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-